package org.csu.webjpetstoreback.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.csu.webjpetstoreback.config.CommonResponse;
import org.csu.webjpetstoreback.model.Inventory;
import org.csu.webjpetstoreback.model.Item;

import java.util.List;
import java.util.Map;

public interface ItemService extends IService<Item> {

    public CommonResponse<Inventory> PutInventory(Inventory inventory);

    //不规范的方法，是从inventory表里根据itemid得到quantity
    public CommonResponse<Inventory> getInventoryByItemId(String itemId);

    public CommonResponse<List<Item>> GetItemListByProductId(String productId);

    public CommonResponse<Item> GetItemByItemId(String itemId);

    public void updateInventoryQuantity(Map<String, String> param);
}
